﻿@*@model IEnumerable<SDE_FIC.Models.Matricula>*@
@model PagedList.IPagedList<SDE_FIC.Models.Matricula>
@using PagedList.Mvc
<link href="~/Content/PagedList.css" rel="stylesheet" type="text/css" />
@{
    
    ViewBag.Title = "Matricula";
    Layout = "~/Views/Shared/_Layout_Sistema.cshtml";
    
}

<h2>@ViewBag.Title > Editar  </h2>


    <legend><h5>Turma: @ViewBag.turma_descricao | 
    @Html.ActionLink("Nova Matricula", "Create", new { idTurma = @ViewBag.turma_idturma}) 
    </h5></legend>


<table class="table table-bordered table-hover">
    <thead>
     <tr>
@*        <th>
            Id Matricula
        </th>*@
        <th>
            Data Matricula
        </th>
        <th>
            Nome
        </th>
@*        <th>
            Turma
        </th>*@
        <th>
            Situação
        </th>
@*        <th>
            Data Situação
        </th>*@
        <th>Ação</th>
    </tr>
    </thead>
    
@foreach (var item in Model) {
    
    <tr>
@*       <td>
            @Html.DisplayFor(modelItem => item.IdMatricula)
        </td>*@
        <td style="text-align:center;">
            @Html.DisplayFor(modelItem => item.DataMatricula)
        </td>
        <td> 
            @Html.DisplayFor(modelItem => item.Aluno.Nome)
        </td>
@*        <td>
            @Html.DisplayFor(modelItem => item.Turma.Descricao) - @Html.DisplayFor(modelItem => item.Turma.Curso.CursoNome)
        </td>*@
        <td style="text-align:center;">
            @Html.DisplayFor(modelItem => item.Situacao)
        </td>
@*        <td>
            @Html.DisplayFor(modelItem => item.DataSituacao)
        </td>*@
        <td style="text-align:center;">
            <a href="@Url.Action("Edit", "Matricula", new { id = item.IdMatricula, idTurma = item.Turma.Idturma })"><img src="~/Content/img/editar.png" alt="Editar"/></a>
            <a href="@Url.Action("Details", "Matricula", new { id=item.IdMatricula, idTurma = item.Turma.Idturma })"><img src="~/Content/img/detalhes.png" alt="Detalhes"/></a>
            <a href="@Url.Action("Delete", "Matricula", new { id = item.IdMatricula, idTurma = item.Turma.Idturma })"><img src="~/Content/img/excluir.png" alt="Excluir"/></a>
        </td>
    </tr>
}
<tr><td colspan="4" style="text-align:center;"><b>Total de alunos matriculados = @Model.Count </b></td></tr>
</table>
<div style="font-size:8pt;width:100%;text-align:right;" >
@Html.PagedListPager(Model, page => Url.Action("Matricular", new {pagina = page}))
</div>